﻿<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>对学生的管理</title>
    <link rel="stylesheet" href="${request.getContextPath}/static/css/Fudaoyuan.css">
    <link rel="stylesheet" href="${request.getContextPath}/static/css/reset.css">
    <script type="text/javascript" src="${resquest.getContextPath}/static/js/jquery-1.12.4.min.js"></script>
    <link rel="stylesheet" type="text/css" href="${resquest.getContextPath}/static/bootstrap-3.3.7-dist/css/bootstrap.min.css">
    <script type="text/javascript" src="${resquest.getContextPath}/static/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
</head>
<body>
<div class="head">
    <img src="${request.getContextPath}/static/img/head3.png" height="64" width="64"/>
    <p>你好！<a href="#">xxx</a>欢迎登陆！&nbsp&nbsp<a class="a1" href="#">退出登录!</a></p>
</div>
<!--头部结束-->
<div class="cont">
    <div class="cont_1">
        <img src="${request.getContextPath}/static/img/wk1.png" height="80" width="90"/>
        <p>对学生的管理</p>
    </div>
    <div class="tjia">
        <a href="/Xueshen"><p class="pp1">学生管理</p></a>
        <a href="/Xueshen_2"><p>添加学生</p></a>
        <a href="/Xueshen_3"><p style="width: 110px">修改学生信息</p></a>
        <a href="/index"><p>返回首页</p></a>
    </div>
    <table border="1" class="tab">
        <tr>
            <th>学号(sid)</th>
            <th>姓名(sname)</th>
            <th>密码(spassword)</th>
            <th>学院(college)</th>
            <th>专业(major)</th>
            <th>电话(stelphone)</th>
            <th>操作</th>
        </tr>
        <c:forEach items="${stu_Info.list }" var="stu">
            <tr>
                <th>${stu.sid }</th>
                <th>${stu.sname }</th>
                <th>${stu.spassword }</th>
                <th>${stu.college }</th>
                <th>${stu.major }</th>
                <th>${stu.stelphone }</th>
                <th>
                    <button class="btn btn-primary btn-sm">
                        <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
                        编辑
                    </button>
                    <button class="btn btn-danger btn-sm">
                        <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
                        删除
                    </button>
                </th>
            </tr>
        </c:forEach>
    </table>
    <!-- 显示分页信息 -->
    <div class="row">
        <!--分页文字信息  -->
        <div class="col-md-6">当前 ${stu_Info.pageNum }页,总${stu_Info.pages }
            页,总 ${stu_Info.total } 条记录</div>
        <!-- 分页条信息 -->
        <div class="col-md-6">
            <nav aria-label="Page navigation">
                <ul class="pagination">
                    <li><a href="/Xueshen?pn=1">首页</a></li>
                    <c:if test="${stu_Info.hasPreviousPage }">
                        <li><a href="/Xueshen?pn=${stu_Info.pageNum-1}"
                               aria-label="Previous"> <span aria-hidden="true">&laquo;</span>
                        </a></li>
                    </c:if>


                    <c:forEach items="${stu_Info.navigatepageNums }" var="page_Num">
                        <c:if test="${page_Num == stu_Info.pageNum }">
                            <li class="active"><a href="#">${page_Num }</a></li>
                        </c:if>
                        <c:if test="${page_Num != stu_Info.pageNum }">
                            <li><a href="/Xueshen?pn=${page_Num }">${page_Num }</a></li>
                        </c:if>

                    </c:forEach>
                    <c:if test="${stu_Info.hasNextPage }">
                        <li><a href="/Xueshen?pn=${stu_Info.pageNum+1 }"
                               aria-label="Next"> <span aria-hidden="true">&raquo;</span>
                        </a></li>
                    </c:if>
                    <li><a href="/Xueshen?pn=${stu_Info.pages}">末页</a></li>
                </ul>
            </nav>
        </div>
    </div>

</div>
</body>
</html>